<?php
require_once ("uglifyjs.php");
$uglify = new UglifyJSCompressor('/usr/nodejs/bin/uglifyjs', 'cache', {});
$uglify->addFile('test.js');

echo "<pre>" . $uglify->getInputScript() . "</pre>";

echo "<pre>" . $uglify->getCommand() . "</pre>";

echo "<pre>" . htmlentities($uglify->compress()) . "</pre>";

print_r ($uglify->status());